home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / cnet / cnet_backup.lha / cnetamigabackup / CNetBackUp_UPDATE351 < prev    next >
Text File  |  1997-04-06  |  4KB  |  96 lines

  1. /**************************************************************************\
  2.     $VER: CNet BackUp UPDATE, v3.51 (6-Apr-97) by Dotoran of Frontiers!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. a=sourceline(2);parse var a . ", "ver" ("vdate")" .;a=random(,,time("s"))
  6. tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
  7. a="rexxsupport.library";if ~show("l",a) then if ~addlib(a,0,-30) then exit
  8. parse source . . fp .;df=left(fp,max(lastpos('/',fp),lastpos(':',fp)))
  9.  
  10. tr "f1CNet Amiga BackUp, UPDATE, v3.51n1"
  11.  
  12. se "   This update will scan your `CNetBackUp.cfg' file to see if any of "
  13. se "your existing BackUp Sets use the `BAK' extension. The NEW Clone "
  14. se "BackUp Set needs to use that extension, so if any of your existing sets "
  15. se "use this extension, you'll be asked to enter a NEW extension for that "
  16. tr "BackUp Set.n2Press any key to attempt this update...g1"
  17.  
  18. call open(f1,df"CNetBackUp.cfg","r")
  19.   bt=readln(f1) ; update=0
  20.   do i=1 to bt
  21.     a=readln(f1) ; parse var a dat.i"|"ext.i"|"txt.i"|"tem.i"|"des.i"|"other.i
  22.     if ext.i="BAK" then update=i
  23.   end i
  24.   dr=readln(f1)
  25. call close(f1)
  26.  
  27. if update=0 then do
  28.   se "n1   It looks as though you are NOT using a BackUp Set with `BAK' as "
  29.   se "it's extension, so no update will be necessary. You are now ready to "
  30.   tr "start using CNet Amiga BackUp, v3.51!" ; exit ; end
  31.  
  32. if tem.update="[Not Used]" then do
  33.   se "n1   This appears to be a v3.51 formatted `CNetBackUp.cfg' file, as "
  34.   tr "it contains a PROPERLY formatted `BAK' setup file!" ; exit ; end
  35.  
  36. UP1:
  37. tr "n1The following BackUp Set is presently using `BAK' as it's extension:n1"
  38. tr "Description: "txt.update
  39. tr "Destination: "des.update
  40. se "n1Please specify a NEW extension for this BackUp Set: L1305640#"
  41. se ext.update"}I"16384+4+1" 3}";gu 70;a=result
  42. if a=""|a=ext.update then do;tr;signal UP1;end
  43.  
  44. bad=0;do i=1 to bt;if ext.i=a then bad=1;end i
  45. if bad then do
  46.   tr "n1Another BackUp Set is already using that extension!n1"
  47.   signal UP1 ; end
  48.  
  49. if find(upper(dr),upper(des.update))>0 then do
  50.   se "n1Make sure your Destination Floppy Disk is in "des.update", then "
  51.   tr "press ANY key to continue...g1"
  52. end
  53.  
  54. if exists(des.update"CNetBackUp_"ext.update".LHA") then do
  55.   se "n1Renaming your existing LHA archive using the `"a"' extension..."
  56.   address command 'RENAME "'des.update'CNetBackUp_'ext.update'.LHA" "'des.update'CNetBackUp_'a'.LHA"'
  57.   tr "ok."
  58. end
  59.  
  60. if exists("SysData:Log/CNetBackUp_"ext.update) then do
  61.   se "n1Renaming your existing LOG using the `"a"' extension..."
  62.   address command 'RENAME "SysData:Log/CNetBackUp_'ext.update'" "SysData:Log/CNetBackUp_'a'"'
  63.   tr "ok."
  64. end
  65.  
  66. if exists(df"CNetBackUp."ext.update) then do
  67.   se "n1Renaming your existing FileList using the `"a"' extension..."
  68.   address command 'RENAME "'df'CNetBackUp.'ext.update'" "'df'CNetBackUp.'a'"'
  69.   tr "ok."
  70. end
  71.  
  72. se "n1Saving updated `CNetBackUp.cfg' file..." ; ext.update=a
  73. call open(f1,df"CNetBackUp.cfg","w")
  74.   call writeln(f1,bt)
  75.   do i=1 to bt
  76.     call writeln(f1,dat.i"|"ext.i"|"txt.i"|"tem.i"|"des.i"|"other.i)
  77.   end i
  78.   call writeln(f1,dr)
  79. call close(f1)
  80. tr "ok.n1"
  81.  
  82. se "   The update process is complete! You are now ready to start using "
  83. tr "CNet Amiga BackUp, v3.51!";exit
  84.  
  85. exit
  86. CHECK:;if ARG() & ARG(1)~="###PANIC" then return ARG(1)
  87.   getcarrier;if result="TRUE" then if ARG() then return ARG(1);else return
  88.   logentry "Lost Carrier!!";bufferflush;exit
  89. SYNTAX:;ERROR:;IOERR:;e1="n1 Error: "rc" ("errortext(rc)")"
  90.   e2="  Line: "left(sigl,4)"File:";c="`"fp", "ver"'";e2=e2" "c;tr e1;tr e2
  91.   logentry e1;logentry e2;e=strip(translate(sourceline(sigl),"\{",""))
  92.   do while e~="";e3="Source: "left(e,37);tr e3;logentry e3;e=substr(e,38);end
  93.   bufferflush
  94. /**************************************************************************\
  95. \****************************************** Frontiers BBS (716)/823-9892 **/
  96.